<script src="<?=base_url(); ?>theme/js/main.js"></script>
<script type="text/javascript">
                                                            
$(document).ready(function(){
$('.table_top').hide(); //Oculta la parte de búsqueda por defecto de la tabla de productos .
});

</script>
<div class="grid_container">
    <div class="grid_12">
        <div class="widget_wrap">
            <div class="widget_top">
                <span class="h_icon clipboard"></span>
                <h6>Listado de Guias de Compra</h6>
            </div>
            <div class="form_container">
                <ul>
                    <li>
                        <div class="form_grid_12">
                            <div class="form_input">
                            <form method="post" action="">
                                <div class="form_grid_2 alpha">
									<input name="document_code" type="text" value="<?php echo $document_code;?>">
                                    <span class=" label_intro">N° de documento</span>
                                </div>
								<div class="form_grid_2 ">
                                <input type="submit" class="btn_small btn_blue" value="Buscar">
                                </div>
                                <span class="clear"></span>
                            </form>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
            <div class="widget_content">
                <table class="display data_tbl">
                    <thead>
                        <tr>
                            <th>N° Documento</th>
                            <th>Fecha</th>
                            <th>Observaciones</th>
                            <th>Total</th>
							<th></th>
                        </tr>
                    </thead>
                    <tbody>
                    <?php $i = 0; ?>
                    <?php foreach ($shop_list as $shop) : ?>
                        <?php $i++; ?>
                        <tr class="<?=($i%2==0) ? "tr_even" : "tr_odd" ?>">
                            <td><?=$shop->document_code; ?></td>
                            <td>
							<?php 
								$date = str_replace('-', '/', $shop->date);
								echo date("d/m/Y", strtotime($date) );
							?></td>
							<td><?=$shop->observations; ?></td>
                            <td align="right">US$ <?=number_format((float)$shop->amount, 2); ?></td>
                           
                            <td align="center">                 
                                <a class="action-icons c-edit" href="<?php echo base_url(); ?>index.php/shop/edit/<?php echo $shop->id_shop; ?>" original-title="Editar">Editar</a>
							</td>
                        </tr>
                    <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <span class="clear"></span>
</div>
